package com.example.sparksubmitter.dto;

import java.util.Date;

public class SparkSqlResponse {

    private String taskId;
    private String status;
    private String message;
    private Date submitTime;
    private Date completionTime;
    private String sparkUiUrl;
    private String yarnAppUrl;
    private String resultLocation;
    private long executionTime;

    // 任务状态常量
    public static final String STATUS_SUBMITTED = "SUBMITTED";
    public static final String STATUS_RUNNING = "RUNNING";
    public static final String STATUS_SUCCEEDED = "SUCCEEDED";
    public static final String STATUS_FAILED = "FAILED";
    public static final String STATUS_CANCELLED = "CANCELLED";

    // 构造函数、Getter 和 Setter 方法
    public SparkSqlResponse() {}

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    public Date getCompletionTime() {
        return completionTime;
    }

    public void setCompletionTime(Date completionTime) {
        this.completionTime = completionTime;
    }

    public String getSparkUiUrl() {
        return sparkUiUrl;
    }

    public void setSparkUiUrl(String sparkUiUrl) {
        this.sparkUiUrl = sparkUiUrl;
    }

    public String getYarnAppUrl() {
        return yarnAppUrl;
    }

    public void setYarnAppUrl(String yarnAppUrl) {
        this.yarnAppUrl = yarnAppUrl;
    }

    public String getResultLocation() {
        return resultLocation;
    }

    public void setResultLocation(String resultLocation) {
        this.resultLocation = resultLocation;
    }

    public long getExecutionTime() {
        return executionTime;
    }

    public void setExecutionTime(long executionTime) {
        this.executionTime = executionTime;
    }
}    